<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Dish</title>
<link href="${pageContext.request.contextPath }/css/bootstrap.min.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/css/index.css"
	rel="stylesheet" type="text/css" />

<link href="${pageContext.request.contextPath }/css/cart-styles.css"
	rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/font-awesome.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/menu-style.css">
</head>
<body>
	<div class="contain">

		<c:import url="header.jsp"></c:import>
		<c:import url="menu.jsp"></c:import>
		<div class="container-fluid">
			<div class="container">
				<h2>My Order--Confirm your order</h2>
				<hr>
				<div class="row">
					<!-- dish title-->
					<table class="table table-striped table-title">
						<tr>
							<td colspan="2" class="td-dish">Dish</td>
							<td class="td-price">Price</td>
							<td class="td-number">Number</td>
							<td class="td-sum">Sum</td>
						</tr>
					</table>

					<div class="order-top"></div>
					<div class="order">
						<table class="table table-content">
							<c:forEach var="item" items="${order.orderItems }">
								<tr>
									<td class="td-img"><img src="${pageContext.request.contextPath }/${item.img}" alt="" class="dish-img"></td>
									<td class="td-dName">${item.dName }</td>
									<td class="td-price">${item.price}</td>
									<td class="td-sum">${item.num }</td>
									<td>${item.price * item.num}</td>
								</tr>
								<c:set value="${sum + item.price * item.num}" var="sum" />
							</c:forEach>
								<tr class="tr-total">
									<td colspan="4" td rowspan="2" class="td-address"><span
										class="address-name">Address:</span><span class="address">${client.caddress }</span></td>
									<td td rowspan="2" class="td-sum">${sum}</td>
								</tr>
						</table>
					</div>
				</div>
				<div class="">
					<a href="${pageContext.request.contextPath }/addOrders/${order.merchant.mId}"><button class="btn btn-danger confirm-btn">Confirm</button></a>
				</div>

			</div>
			<!--container end-->
		</div>

	</div>
	<!--contain end-->

	<div class="footer"></div>
	<!--footer end-->
</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>

<script src='${pageContext.request.contextPath }/js/TweenMax.min.js'></script>
<script src="${pageContext.request.contextPath }/js/menu-script.js"></script>
</html>